<?php
declare (strict_types = 1);

namespace app\middleware;

use think\Response;

class Check
{
    /**
     * 处理请求
     *
     * @param \think\Request $request
     * @param \Closure       $next
     * @return Response
     */
    public function handle($request, \Closure $next)
    {
        //

//        if($request['china']){
//            return response(json_encode(["ok"=>"不可以"]),200);
//        }
//        return $next($request);

        echo "start<br/>";

        $response = $next($request);

        echo "end<br/>";

        return $response;
    }


    public function end(Response $response){

        echo "end - end";
    }
}
